<%--
  Created by IntelliJ IDEA.
  User: Cool
  Date: 2023/10/17
  Time: 15:19
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <%@ include file="logined.jsp"%>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Title</title>
</head>
<body>
<form action="saveEmail.jsp?id=1" method="get">
    <table border="1">
        <tr>
            <td>选择你的雅虎邮箱:</td>
            <td><input type="text" name="email">@
                <select name="domain">
                    <option value="yahoo.cn">yahoo.cn</option>
                    <option value="sina.com.cn">sina.com.cn</option>
                    <option>163.cn</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>密码:</td>
            <td><input type="password" name="password1" id="password1" required></td>
        </tr>
        <tr>
            <td>再次输入密码:</td>
            <td><input type="password" name="password2" id="password2"
                       onblur="passwordValidate()" required></td>
        </tr>
        <tr>
            <td>真实姓名:</td>
            <td><input type="text" name="realname" id="realname"></td>
        </tr>
        <tr>
            <td>出生日期:</td>
            <td><input type="datetime" name="datetime" id="datetime"></td>
        </tr>
        <tr>
            <td>性别:</td>
            <td>
                <input type="radio" name="sex" value="男" id="sex1" checked>男
                <input type="radio" name="sex" value="女" id="sex2">女
            </td>
        </tr>
        <tr>
            <td>杂志订阅:</td>
            <td>
                <input type="checkbox" name="checkbox" value="旅游">旅游
                <input type="checkbox" name="checkbox" value="财经">财经
                <input type="checkbox" name="checkbox" value="汽车">汽车
                <input type="checkbox" name="checkbox" value="音乐">音乐
            </td>
        </tr>
        <tr>
            <td>雅虎服务条款</td>
            <td>
                    <textarea name="textarea" id="textarea" cols="50" rows="5">雅虎中国对于任何包含于、经由、或联结、下载或从任何与本网站有关服务(以下简称[服务])所获得之资讯、内容或广告(以下简称[资料]),您于此接受并承认信赖任何[资料]所生之风险应自行承担。雅虎中国，有权但无此义务，改善或更正在[服务]或[资料]任何部分之错
                    </textarea>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <input type="submit" value="同意服务条款并提交">
                <input type="button" value="清空">
            </td>
        </tr>
    </table>
</form>

</body>
</html>
<script>
    function passwordValidate() {
        if (password.value !== password2.value) {
            alert("两次输入的密码不一致！")
            password2.value = ""
        }
    }
</script>
